import java.util.*;

public class HJ23 {//删除字符串中出现次数最少的字符，设计数组记录每个字符出现次数
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        // 快速找出最少次数
        int min = Integer.MAX_VALUE;
        Map<Character, Integer> map = new HashMap<>();//记录每个字符的次数
        for (char ch : str.toCharArray()) {
            map.put(ch, map.getOrDefault(ch, 0) + 1);
            min = Math.min(min, map.get(ch));
        }
        StringBuilder res = new StringBuilder();
        for (char ch : str.toCharArray()) {
            if (map.get(ch) != min) {
                res.append(ch);
            }
        }
        System.out.println(res);
    }
}